//
//  ViewController.m
//  UI_15_下午练习_collectionView封装轮播图
//
//  Created by li cheng on 16/8/4.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "ViewController.h"
#import "Album.h"
#import "ImageViewCollectionViewCell.h"
@interface ViewController ()<AlbumDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
//    Album *album = [[Album alloc] initWithFrame:[UIScreen mainScreen].bounds];
    NSArray *array = [NSArray arrayWithObjects:@"0", @"1", @"2", @"3", @"4", @"5",nil];
    Album *album = [[Album alloc] initWithFrame:[UIScreen mainScreen].bounds array:array];
    album.delegate = self;
    album.delegateTwo = self;
    [self.view addSubview:album];
    
}
#pragma mark - Album
- (void)collectionView:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath{
    NSLog(@"这是第%lditem", indexPath.row);
}
#pragma mark - cell自定义
- (void)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath cell:(__kindof UICollectionViewCell *)cell{
    NSArray *array = @[@"10", @"5", @"6", @"7", @"8", @"9", @"10", @"5"];
    ImageViewCollectionViewCell *cell1 = cell;
    cell1.imageView.image = [UIImage imageNamed:array[indexPath.row]];
//    cell.frame = CGRectMake(0, 0, 300, 400);
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
